# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
pkgname=grass
pkgver=0.13.4
pkgrel=0
pkgdesc="Sass compiler written purely in Rust"
url="https://github.com/connorskees/grass"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/connorskees/grass/archive/refs/tags/$pkgver.tar.gz
	update-rust-libc.patch
	fix-i64-overflow.patch
	"
options="net" # cargo fetch

prepare() {
	default_prepare

	cargo fetch --locked --target="$CTARGET"
}

build() {
	cargo auditable build -p grass --release --frozen
}

check() {
	cargo test -p grass --tests
}

package() {
	install -Dm755 target/release/grass "$pkgdir"/usr/bin/grass
}

sha512sums="
7d914987bffca3bde4b11e1b8b98ab50c9a0ffe6085eb14f8574c025120b89a50303dd075e01d91f0d11a94d15c0edabd186c12212bc6ed1527b219381a1cd75  grass-0.13.4.tar.gz
c580a9ec997ea1bcd0a1c61228f1fefaa3e354d13bd020b9cbccfb9a60ae4d5236af8eae3a44d75a7e2c944d81d07250c29c39c50ffedd325d0d14e7cf48b159  update-rust-libc.patch
37971869647ece4182cfcaa88d90a2fbabbb51b787bb04111acf366170daa5d94feddaab67f20595f8912b265d5a4a2803e1a654f703ad25c3f62f16dd5e8e33  fix-i64-overflow.patch
"
